package com.next.easynavigation.adapter;



import android.view.View;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.PagerAdapter;

import java.util.List;

/**
 * Created by Jue on 2018/6/2.
 */

public class ViewPagerAdapter1 extends PagerAdapter {

    private List<Fragment> fragments;

//    public ViewPagerAdapter1(FragmentManager fm, List<Fragment> fragments) {
//        super(fm);
//        this.fragments = fragments;
//    }
//
//    @Override
//    public Fragment getItem(int position) {
//        Fragment fragment = fragments.get(position);
//        return fragment;
//    }

    @Override
    public int getCount() {
        return fragments == null ? 0 : fragments.size();
    }

    @Override
    public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
        return false;
    }
}
